


        $(document).ready(function(){
            $('section#portfolio .case-studies .item').mouseenter(function(){
                var ind = $(this).index();
                if(!ind || ind % 3 == 0){
                    if($('section#portfolio .case-studies .item').eq(ind + 3).length){
                        $('section#portfolio .case-studies .item').eq(ind + 3).css('top','103px');
                    }
                    if($('section#portfolio .case-studies .item').eq(ind + 6).length){
                        $('section#portfolio .case-studies .item').eq(ind + 6).css('top','103px');
                    }
                    if($('section#portfolio .case-studies .item').eq(ind + 9).length){
                        $('section#portfolio .case-studies .item').eq(ind + 9).css('top','103px');
                    }
                }else if(ind % 3 == 1){
                    $('section#portfolio .case-studies .item').css('top','-103px');
                    $(this).css('top','');
                    $('section#portfolio .case-studies .item:lt(' + ind + ')').css('top','');
                    if($(this).prev().length){
                        $(this).prev().css('top','');
                    }
                    if($(this).next().length){
                        $(this).next().css('top','');
                    }
                    
                    if($('section#portfolio .case-studies .item').eq(ind + 3).length){
                        $('section#portfolio .case-studies .item').eq(ind + 3).css('top','');
                    }
                    if($('section#portfolio .case-studies .item').eq(ind + 6).length){
                        $('section#portfolio .case-studies .item').eq(ind + 6).css('top','');
                    }
                }else{
                    $('section#portfolio .case-studies .item').css('top','-103px');
                    $('section#portfolio .case-studies .item:lt(' + ind + ')').css('top','');
                    $(this).css('top','');
                    /*
                    if($(this).prev().length){
                        $(this).prev().css('top','');
                    }
                    if($(this).next().length){
                        $(this).next().css('top','');
                    }
                    */
                    if($('section#portfolio .case-studies .item').eq(ind + 3).length){
                        $('section#portfolio .case-studies .item').eq(ind + 3).css('top','');
                    }
                    if($('section#portfolio .case-studies .item').eq(ind + 6).length){
                        $('section#portfolio .case-studies .item').eq(ind + 6).css('top','');
                    }
                    
                }
            })
            $('section#portfolio .case-studies .item').mouseleave(function(){
                $('section#portfolio .case-studies .item').css('top','');
            })
        })